export function parsePath(path) {
  const segments = path.split('.')
  return function (obj) {
    try {
      return segments.reduce((obj, segment) => {
        console.log(segment, 'segment')
        return obj[segment]
      }, obj)
    } catch (err) {
      return
    }
  }
}
